package com.smh.a03DateDemo3;

import java.time.LocalTime;

public class LocalTimeDemo1 {
    public static void main(String[] args) {

        LocalTime localTime = LocalTime.now();
        System.out.println(localTime);

        LocalTime localTime1 = LocalTime.of(11,12,13);
        System.out.println(localTime1);



        int hour = localTime1.getHour();
        int minute = localTime1.getMinute();
        int second = localTime1.getSecond();

        System.out.println(hour+","+minute+","+second);

        LocalTime localTime2 = localTime1.withHour(5);
        System.out.println(localTime2);

        System.out.println(LocalTime.of(11,11,11,11));

        System.out.println(localTime.isAfter(localTime1));
        System.out.println(localTime.isBefore(localTime1));

        System.out.println(localTime2.plusHours(4));
        System.out.println(localTime2.plusMinutes(14));
        System.out.println(localTime2.plusSeconds(14));

        //秒杀活动


    }
}
